def 冒泡排序(arr):
    for i in range(len(arr)):
        for j in range(i):
            if arr[i]<arr[j]:
                arr[i],arr[j]=arr[j],arr[i]
    print(arr)
冒泡排序([9,8,7,6,5,4,3,2,1])